//
//  GrowManager.h
//  leo
//
//  Created by 常艳 on 15/12/10.
//  Copyright (c) 2015年 mdx. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HttpRequester.h"
#import "DBHelper.h"
#import "DataManager.h"
#import "GrowDataManager.h"
#import "User.h"
#import "Task.h"
#import "ExpPolicy.h"
#import "Growth.h"
#import "AppDelegate.h"
#define GrowManager_TAG @"GrowManager-----------------------"
@interface GrowManager : NSObject
@property (nonatomic,strong) HttpRequester *theRequeseter;
@property (nonatomic,strong) DBHelper *theDbHelper;
@property (nonatomic,strong) DataManager *theManager;
@property (nonatomic,strong) GrowDataManager *growDataManager;
@property (nonatomic, strong) AppDelegate *mydelegate;
//获取系统任务
-(void)getPresetTasks:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//布置任务
-(void)assignTask:(Task *)task completion:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//完成任务
-(void)finishTask:(Task *)task completion:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//确认完成任务
-(void)confirmTask:(Task *)task  result:(BOOL)result completion:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//获取历史任务
-(void)getHistoryTask:(NSString *)deviceUid randomCode:(NSString *)randomCode completion:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//获取手表经验等级策略
-(void)getExpPolicy:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;
//获取手表成长值
-(void)getGrowthData:(NSString *)deviceUid completion:(void (^)(SyncResult result,NSDictionary *retValue,NSString * description))callback;

-(void)getTaskPic:(NSString *)url taskId:(NSString *)taskId type:(TaskFileType)type;
-(void)getTaskAudio:(NSString *)url randomCode:(NSString *)randomCode type:(TaskFileType)type audioHash:(NSString *)audioHash theId:(NSString *)theId;
-(void)getTaskAudioByHash:(NSString *)audioHash randomCode:(NSString *)randomCode type:(TaskFileType)type theId:(NSString *)theId;
-(void)getWatchTheme:(void (^)(SyncResult result,NSDictionary *retValue,NSString *description))callback deviceUid:(NSString *)deviceUid;
@end
